#@laybase() #define main()

<div style="overflow: hidden; position: relative;">
	<div class="col-md-3">
		#setLocal(tabs=["-","运营商","产品","日期","姓名","进度"])
		#setLocal(attrs=["owner","Operator","product","date","name","step"])
		#@dataTable(tabs,attrs,orderList,"firstTrial")</div>
	#@datashowbox()
	<div class="col-md-6">
		<div class="nano"
			style="position: relative; height: 692px; overflow: hidden; display: none;"
			id="databox">
			<style>
#datalist .fileuploadul li h4 {
	position: relative;
}

#datalist .fileuploadul li h4 label {
	position: absolute;
	top: 5px;
	right: 6px;
}

#datalist .fileuploadul li h4 label p {
	padding: 4px 12px;
}

#datalist .fileuploadul li h4 span {
	font-size: 14px;
}

#datalist .fileuploadul li .filebox {
	position: relative;
	overflow: hidden;
}

#datalist .fileuploadul li .filebox .preview {
	width: 177px;
	height: 170px;
	padding: 10px;
	float: left;
	position: relative;
	border: 1px solid #fff;
    border-radius: 5px;
    cursor: pointer;
}

#datalist .fileuploadul li .filebox .preview:hover {
	background-color: #f1f7fd;
    border-color: #b8d6fb;
}

#datalist .fileuploadul li .filebox .preview .progress {
	width: 0;
	height: 10px;
	border-radius: 6px;
	background-color: #337ab7;
	position: absolute;
	bottom: 0;
	left: 0;
	margin: 0;
}

#datalist .fileuploadul li .filebox .preview .imgbox {
	position: relative;
	height: 125px;
}

#datalist .fileuploadul li .filebox .preview p {
	text-align: center;
}

#datalist .fileuploadul li .filebox .preview p span.glyphicon {
	color: #d9534f;
	padding: 0 2px;
	top: -2px;
}

#datalist .fileuploadul li .filebox .preview p span.del {
	cursor: pointer;
}

#datalist .fileuploadul li .filebox .preview p span.name {
	display: inline-block;
	width: 78%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#datalist .fileuploadul li .filebox .preview .imgbox img {
	position: absolute;
}

#datalist .fileuploadul li .filebox .tipbox {
	display: none;
	position: absolute;
	width: 100%;
	top: 0;
	left: 0;
	z-index: 2;
}

#datalist .fileuploadul li button.btn {
	display: none;
}

#message-text::-webkit-input-placeholder {
	color: #fd0421;
}
<<<<<<< .mine
.bg{
	width:100%;
	height:42px;
	display:flex;
	align-items:center;
	justify-content: space-between;
	color: #337ab7;
	font-size:18px;
    background-color: #eeeeee;
    padding: 10px 6px 10px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 20px;
    margin-top:20px;
}
.bg>p{
	margin:0;
	padding:0;
}
.bg>button{
	padding: 4px 12px;
}
.panel-heading{
	padding:0;
}
#datalist .panel-group h4{
	margin-bottom:0;
	background-color:#f7f7f7;
	border:none;

}
.panel-group{
	padding:10px;
	margin-top:-20px;
	border:1px solid #eee;
	border-radius:5px;
	display:none;
}
.panel-group td{
	text-align:center;
}
=======
>>>>>>> .r331
</style>
			<div id="datalist" class="nano-content">
<<<<<<< .mine
				<div id='yysBG' class='bg'>
					<p>运营商报告</p>
					<button class='btn btn-info' data_show='#accordion' id='show_btn'>查看报告</button>
				</div>
				<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_report" aria-expanded="true" aria-controls="collapseOne">
					         报告情况
					       </a>
					     </h4>
					   </div>
					   <div id="bg_report" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
					     <div class="panel-body">
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='reportHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_basicInfo">
					         基本信息
					       </a>
					     </h4>
					   </div>
					   <div id='bg_basicInfo' class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body">
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='basicInfoHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab">
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_contactInfo" >
					         紧急联系人信息
					       </a>
					     </h4>
					   </div>
					   <div id="bg_contactInfo" class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='contactInfoHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab">
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_relationInfo">
					         关联信息
					       </a>
					     </h4>
					   </div>
					   <div id="bg_relationInfo" class="panel-collapse collapse  in" role="tabpanel" >
					     <div class="panel-body" >
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='relationInfoHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab">
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_personas" >
					         用户画像
					       </a>
					     </h4>
					   </div>
					   <div id="bg_personas" class="panel-collapse collapse in" role="tabpanel">
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='personasHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_basicInfoCheck">
					         基本信息检测
					       </a>
					     </h4>
					   </div>
					   <div id="bg_basicInfoCheck" class="panel-collapse collapse  in" role="tabpanel">
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='basicInfoCheckHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_riskListCheck" >
					         风险清单检测
					       </a>
					     </h4>
					   </div>
					   <div id="bg_riskListCheck" class="panel-collapse collapse in" role="tabpanel">
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='riskListCheckHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_overdueLoanCheck">
					         信贷逾期检查
					       </a>
					     </h4>
					   </div>
					   <div id="bg_overdueLoanCheck" class="panel-collapse collapse in" role="tabpanel">
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='overdueLoanCheckHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_multiLendCheck">
					         多头借贷检查
					       </a>
					     </h4>
					   </div>
					   <div id="bg_multiLendCheck" class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='multiLendCheckHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_riskCallCheck">
					         风险通话检测
					       </a>
					     </h4>
					   </div>
					   <div id="bg_riskCallCheck" class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='riskCallCheckHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_callAnalysis" >
					         通话概况
					       </a>
					     </h4>
					   </div>
					   <div id="bg_callAnalysis" class="panel-collapse collapse  in" role="tabpanel">
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='callAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_activeCallAnalysis" >
					         活跃情况
					       </a>
					     </h4>
					   </div>
					   <div id="bg_activeCallAnalysis" class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='activeCallAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_silenceAnalysis">
					         静默情况
					       </a>
					     </h4>
					   </div>
					   <div id="bg_silenceAnalysis" class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='silenceAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_callDurationAnalysis" >
					         通话时间段分析
					       </a>
					     </h4>
					   </div>
					   <div id="bg_callDurationAnalysis" class="panel-collapse collapse in" role="tabpanel">
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='callDurationAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_consumptionAnalysis" >
					         消费能力
					       </a>
					     </h4>
					   </div>
					   <div id="bg_consumptionAnalysis" class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='consumptionAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_tripAnalysis" >
					         出行信息
					       </a>
					     </h4>
					   </div>
					   <div id="bg_tripAnalysis" class="panel-collapse collapse in " role="tabpanel">
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='tripAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_socialContactAnalysis" >
					         社交关系概况
					       </a>
					     </h4>
					   </div>
					   <div id="bg_socialContactAnalysis" class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='socialContactAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_callAreaAnalysis" >
					         通话区域分析
					       </a>
					     </h4>
					   </div>
					   <div id="bg_callAreaAnalysis" class="panel-collapse collapse in" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='callAreaAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#bg_contactAnalysis" >
					         通话联系人分析
					       </a>
					     </h4>
					   </div>
					   <div id="bg_contactAnalysis" class="panel-collapse collapse" role="tabpanel" >
					     <div class="panel-body" id=''>
					       <!-- 数据 -->
					       <table class="table table-bordered table-striped">
							    <tbody id='contactAnalysisHTML'>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
				</div>
				
=======
>>>>>>> .r331
				<!-- <div id='pgBG' class='bg'>
					<p>车辆评估报告</p>
					<button class='btn btn-info' data_show='#pgBGshow' id='pgBGshow_btn'>查看报告</button>
				</div>
				<div class="panel-group" id="pgBGshow" role="tablist" aria-multiselectable="true">
					<div class="panel panel-default">
					   <div class="panel-heading" role="tab" >
					     <h4 class="panel-title">
					       <a role="button" data-toggle="collapse" data-parent="#accordion" href="#pgbg_report" aria-expanded="true" aria-controls="collapseOne">
					         报告情况
					       </a>
					     </h4>
					   </div>
					   <div id="pgbg_report" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
					     <div class="panel-body">
					       数据
					       <table class="table table-bordered table-striped">
							    <tbody id=''>

							    </tbody>
							</table>
					     </div>
					   </div>
					</div>
				 </div> -->
				
				<ul class="fileuploadul">
					<li data-paramtername="zxcx" data-maxnum="10" data-minup="1" tipname="法院执行人信息查询">
						<h4 style="cursor: auto;">
							<a href="http://zhixing.court.gov.cn/search/" target="_blank">法院执行人信息查询</a>

							<label>
								<p class="btn btn-primary">选择图片</p> <span class="filenownum"></span>
								<input type="file" name="zxcx"
								accept="image/png, image/gif, image/jpg, image/jpeg" multiple
								style="display: none;">
							</label>
						</h4>
						<div class="filebox">
							<div class="tipbox alert alert-danger"></div>
						</div>
						<button class="btn btn-default btn-sm dropdown-toggle"
							type="button">开始上传</button>
					</li>
					<li data-paramtername="wzcx" data-maxnum="10" data-minup="1" tipname="违章查询">
						<h4 style="cursor: auto;">
							<a href="http://www.122.gov.cn/m/map/select" target="_blank">违章查询</a> <label>
								<p class="btn btn-primary">选择图片</p> <span class="filenownum"></span>
								<input type="file" name="zxcx"
								accept="image/png, image/gif, image/jpg, image/jpeg" multiple
								style="display: none;">
							</label>
						</h4>
						<div class="filebox">
							<div class="tipbox alert alert-danger"></div>
						</div>
						<button class="btn btn-default btn-sm dropdown-toggle"
							type="button">开始上传</button>
					</li>
					<li data-paramtername="pgcx" data-maxnum="10" data-minup="2" tipname="汽修宝、车300、第一车网">
						<h4 style="cursor: auto;">
							
							<a href="http://om2.nanxinwang.com/index.php/Web/Vin/detail?vin=LSGPC54U2BF084695"
								target="_blank">汽修宝</a>
							<a href="https://www.che300.com/" target="_blank">车300</a> 
							<a href="http://www.iautos.cn/yunnan/" target="_blank">第一车网</a>
							<label>
								<p class="btn btn-primary">选择图片</p> <span class="filenownum"></span>
								<input type="file" name="zxcx"
								accept="image/png, image/gif, image/jpg, image/jpeg" multiple
								style="display: none;">
							</label>
						</h4>
						<div class="filebox">
							<div class="tipbox alert alert-danger"></div>
						</div>
						<button class="btn btn-default btn-sm dropdown-toggle"
							type="button">开始上传</button>
					</li>
					<!-- 				<li data-paramtername="lxr" data-maxnum="10"> -->
					<!-- 					<h4 style="cursor: auto;"> -->
					<!-- 						借款人的联系人资料 -->
					<!-- 						<a href="http://www.189.cn/" target="_blank">电信</a> -->
					<!-- 						<a href="http://www.10086.cn/" target="_blank">移动</a> -->
					<!-- 						<a href="http://www.10010.com/" target="_blank">联通</a> -->
					<!-- 						<label> -->
					<!-- 							<p class="btn btn-primary">选择图片</p> -->
					<!-- 							<span class="filenownum"></span> -->
					<!-- 							<input type="file" name="zxcx" accept="image/png, image/gif, image/jpg, image/jpeg" multiple style="display: none;"> -->
					<!-- 						</label> -->
					<!-- 					</h4> -->
					<!-- 					<div class="filebox"> -->
					<!-- 						<div class="tipbox alert alert-danger"></div> -->
					<!-- 					</div> -->
					<!-- 					<button class="btn btn-default btn-sm dropdown-toggle" type="button">开始上传</button> -->
					<!-- 				</li> -->
				</ul>
			</div>
		</div>
	</div>
	<div class="btnbox" id="btn-s-d-box">
		<button type="button" class="btn btn-success" id="tongguo" data-loading-text="请稍后...">通过</button>
		<button type="button" class="btn btn-danger" id="jujue">拒绝</button>
		<button type="button" class="btn btn-danger" id="delete" style="width: 100%;margin-top: 5px;border-radius: 4px;">删除</button>
	</div>
	<div class="msginfo" id="msginfo">
		<div class="modal-dialog modal-sm" isshow="true"">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close cl">
						<span>×</span>
					</button>
					<h4 class="modal-title" id="exampleModalLabel">拒绝理由</h4>
				</div>
				<div class="modal-body">
					<form>
						<div class="form-group">
							<textarea class="form-control" id="message-text"></textarea>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn cl btn-default">关闭</button>
					<button type="button" class="btn btn-primary" id="jjsubmit" data-loading-text="请稍后...">提交</button>
				</div>
			</div>
		</div>
	</div>
	<style>
.btnbox {
	width: 240px;
	position: absolute;
	bottom: 0;
	left: 50%;
	margin-left: -120px;
	display: none;
}

.btnbox button {
	float: left;
	width: 50%;
	border-radius: 4px 0 0 4px;
}

.btnbox button.btn-danger {
	border-radius: 0 4px 4px 0;
}

.msginfo {
	display: none;
	position: absolute;
	bottom: 26px;
	left: 50%;
	margin-left: -150px;
}

.msginfo .btnbox {
	float: none;
	margin: 20px auto;
	overflow: hidden;
}

.msginfo .btnbox button {
	float: left;
	width: 50%;
}

.msginfo .btnbox button.btn-success {
	border-radius: 4px 0 0 4px;
}

.msginfo .btnbox button.btn-danger {
	border-radius: 0 4px 4px 0;
}

.css3loadingbox .line-spin-fade-loader>div {
	background-color: #fff;
}
</style>
	<div class="col-md-3 scrollbox" style="display: none;">
		<select id="selectphoto" class="form-control"></select>
		<div id="pageContent">
			
		</div>

	</div>
</div>
<script src="/assets/js/perfect-scrollbar.js"></script>
<script src="/assets/js/jquery.mousewheel.js"></script>
<script>
	$(function(){
<<<<<<< .mine
		
		$.ajax({
			type:'get',
			url:'/admin/queryReport',
			success:function(data){
				var data = JSON.parse(data);
				var activeCallAnalysis = data.activeCallAnalysis,//活跃情况-数组
					basicInfo = data.basicInfo,//基本情况-对象
					basicInfoCheck = data.basicInfoCheck,//基本信息监测-数组
					contactInfo = data.contactInfo,//紧急联系人信息-数组
					multiLendCheck = data.multiLendCheck,//多头借贷检查-数组
					overdueLoanCheck = data.overdueLoanCheck,//信贷逾期检查-数组
					riskCallCheck = data.riskCallCheck,//风险通话监测-数组
					riskListCheck = data.riskListCheck,//风险清单监测-数组
					callAnalysis = data.callAnalysis,//通话概况-对象
					callAreaAnalysis= data.callAreaAnalysis,//通话区域分析-数组
					callDurationAnalysis = data.callDurationAnalysis,//通话时间段分析-数组
					consumptionAnalysis = data.consumptionAnalysis,//消费能力-数组
					contactAnalysis = data.contactAnalysis,//通话联系人分析-数组
					personas = data.personas,//用户画像-对象
					relationInfo = data.relationInfo,//关联信息-对象
					report = data.report,//报告情况-对象
					silenceAnalysis= data.silenceAnalysis,//静默情况--对象
					tripAnalysis= data.tripAnalysis,//出行信息-数组
					socialContactAnalysis = data.socialContactAnalysis;//社交关系概况-数组
				
				//报告情况
				var reportHTML = '';
				if(report != null){
					var reportMap = {
							dataSource:'数据来源',
							reportTime:'报告时间',
							reportNo:'报告编号'
						}
					for(var key in report){
						reportHTML+=`
							<tr>
								<td>${reportMap[key]}</td>
					            <td>${report[key]}</td>
					        </tr>
						`;
					}
				}else{
					reportHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#reportHTML').html(reportHTML);
					
				//基本信息
				var basicInfoHTML = '';
				if(basicInfo != null){
					var basicInfoMap = {
							name:'姓名',
							identityNo:'身份证号',
							gender:'性别',
							age:'年龄',
							mobile:'手机号',
							regTime:'入网时间',
							nativeAddress:'出生地'
					}
					for(var key in basicInfo){
						basicInfoHTML+=`
							<tr>
								<td>${basicInfoMap[key]}</td>
					            <td>${basicInfo[key]}</td>
					        </tr>
						`;
					}
				}else{
					basicInfoHTML = `<tr><td>暂无资料！</td></tr>`
				}
				
				$('#basicInfoHTML').html(basicInfoHTML);
				
				//紧急联系人
				var contactInfoHTML = '';
				if(contactInfo.length>0){
					var contactInfoMap = {
							name:'姓名',
							identityNo:'身份证号',
							mobile:'手机号',
							relationship:'与本人关系《参见附录社会关系》',
							callCnt:'通话次数',
							callTime:'通话时长（s）',
							callRank:'通话频度排名',
							isHitRiskList:'是否命中风险清单(1:命中，0：未命中)'
					}
					for(var i=0;i<contactInfo.length;i++){
						for(var key in contactInfo){
							contactInfoHTML += `
								<tr>
									<td>${contactInfo[i].contactInfoMap[key]}</td>
						            <td>${contactInfo[i].contactInfo[key]}</td>
						        </tr>
							`; 
						}
					}
				}else{
					contactInfoHTML = `<tr><td>暂无资料！</td></tr>`
				}
				
				$('#contactInfoHTML').html(contactInfoHTML);
				
				//关联信息
				var relationInfoHTML = '';
				if(relationInfo != null){
					var identiyNos = relationInfo.identiyNos,
						mobiles = relationInfo.mobiles,
						homeAddresses = relationInfo.homeAddresses;
					if(identiyNos.length>0){
						for(var i=0;i<identiyNos.length;i++){
							relationInfoHTML += `
							<tr>
								<td>关联身份证信息</td>
					            <td>${identiyNos[i]}</td>
					        </tr>
							`
						}
					}
					if(mobiles.length>0){
						for(var i=0;i<mobiles.length;i++){
							relationInfoHTML += `
							<tr>
								<td>关联手机号信息</td>
					            <td>${mobiles[i]}</td>
					        </tr>
							`
						}
					}
					if(homeAddresses.length>0){
						for(var i=0;i<homeAddresses.length;i++){
							relationInfoHTML += `
							<tr>
								<td>关联家庭住址信息</td>
					            <td>${homeAddresses[i]}</td>
					        </tr>
							`
						}
					}
					if(identiyNos.length <= 0 && mobiles.length <= 0 && homeAddresses.length <= 0 ){
						relationInfoHTML = `<tr><td>暂无资料！</td></tr>`
					}
				}else{
					relationInfoHTML = `<tr><td>暂无资料！</td></tr>`
				}
				
				$('#relationInfoHTML').html(relationInfoHTML);
				
				//用户画像
				var personasHTML = '';
				if(personas != null){
					var riskProfile = personas.riskProfile,
						socialContactProfile = personas.socialContactProfile,
						callProfile = personas.callProfile,
						consumptionProfile = personas.consumptionProfile;
					var riskProfileMap = {
						riskListCnt:'命中风险清单次数',
						overdueLoanCnt:'信贷逾期次数',
						multiLendCnt:'多头借贷次数',
						riskCallCnt:'风险通话次数'
					};
					var socialContactProfileMap = {
						freContactArea:'最常联系人区域',
						contactNumCnt:'联系人号码总数',
						interflowContactCnt:'互通号码数',
						contactRishCnt:'联系人风险名单总数'
					};
					var callProfileMap = {
						avgCallCnt:'日均通话次数',
						avgCallTime:'日均通话时长(m)',
						silenceCnt:'静默次数',
						nightCallCnt:'夜间通话次数',
						nightCallTime:'夜间平均通话时长'
					};
					for(var key in riskProfile){
						personasHTML += `
							<tr>
								<td>${riskProfileMap[key]}</td>
					            <td>${riskProfile[key]}</td>
					        </tr>
						`; 
					}
					for(var key in socialContactProfile){
						personasHTML += `
							<tr>
								<td>${socialContactProfileMap[key]}</td>
					            <td>${socialContactProfile[key]}</td>
					        </tr>
						`; 
					}
					for(var key in callProfile){
						personasHTML += `
							<tr>
								<td>${callProfileMap[key]}</td>
					            <td>${callProfile[key]}</td>
					        </tr>
						`; 
					}
					personasHTML += `
						<tr>
							<td>月均消费</td>
				            <td>${consumptionProfile.avgFeeMonth}</td>
				        </tr>
					`; 
				}else{
					personasHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#personasHTML').html(personasHTML);
				
				//基本信息监测
				var basicInfoCheckHTML = '';
				if(basicInfoCheck.length>0){
					basicInfoCheckHTML += `
					<tr>
						<td>检查项描述</td>
						<td>检查结果</td>
						<td>检查结果描述</td>
			        </tr>
					`
					for(var i=0;i<basicInfoCheck.length;i++){
						basicInfoCheckHTML += `
				        <tr>
				            <td>${basicInfoCheck[i].desc}</td>
				            <td>${basicInfoCheck[i].result}</td>
				            <td>${basicInfoCheck[i].resultDesc}</td>
				        </tr>
						`
					}
				}else{
					basicInfoCheckHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#basicInfoCheckHTML').html(basicInfoCheckHTML);
				
				//风险清单监测
				var riskListCheckHTML = '';
				if(riskListCheck.length>0){
					riskListCheckHTML += `
					<tr>
						<td>检查项</td>
						<td>检查项描述</td>
						<td>检查结果</td>
			        </tr>
					`
					for(var i=0;i<riskListCheck.length;i++){
						riskListCheckHTML += `
				        <tr>
				        	<td>${riskListCheck[i].item}</td>
				            <td>${riskListCheck[i].desc}</td>
				            <td>${riskListCheck[i].result}</td>
				        </tr>
						`
					}
				}else{
					riskListCheckHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#riskListCheckHTML').html(riskListCheckHTML);
				
				//2.3信贷逾期检查
				var overdueLoanCheckHTML = '';
				if(overdueLoanCheck.length>0){
					overdueLoanCheckHTML += `
					<tr>
						<td>检查项</td>
						<td>检查项描述</td>
						<td>逾期金额(范围)</td>
						<td>逾期天数(范围)</td>
						<td>逾期时间(yyyy-MM)</td>
			        </tr>
					`
					for(var i=0;i<overdueLoanCheck.length;i++){
						overdueLoanCheckHTML += `
				        <tr>
				        	<td rowspan='${overdueLoanCheck[i].details.length}'>${overdueLoanCheck[i].item}</td>
				            <td rowspan='${overdueLoanCheck[i].details.length}'>${overdueLoanCheck[i].desc}</td>
				        </tr>
				            `
				            for(var j=0;j<overdueLoanCheck[i].details.length;j++){
				            	overdueLoanCheckHTML+=`
				            	<tr>
				            		<td>overdueLoanCheck[i].details[j].overdueAmt</td>
				            		<td>overdueLoanCheck[i].details[j].overdueDays</td>
				            		<td>overdueLoanCheck[i].details[j].overdueTime</td>
				            	</tr>
				            	`
				            }
					}
				}else{
					overdueLoanCheckHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#overdueLoanCheckHTML').html(overdueLoanCheckHTML);
				//2.4多头借贷检查
				var multiLendCheckHTML = '';
				if(multiLendCheck.length>0){
					multiLendCheckHTML += `
					<tr>
						<td>检查项</td>
						<td>检查项描述</td>
						<td>借贷平台类型</td>
						<td>借贷次数</td>
			        </tr>
					`
					for(var i=0;i<multiLendCheck.length;i++){
						multiLendCheckHTML += `
				        <tr>
				        	<td rowspan='${multiLendCheck[i].details.length}'>${multiLendCheck[i].item}</td>
				            <td rowspan='${multiLendCheck[i].details.length}'>${multiLendCheck[i].desc}</td>
				        </tr>
				            `
				            for(var j=0;j<multiLendCheck[i].details.length;j++){
				            	multiLendCheckHTML+=`
				            	<tr>
				            		<td>multiLendCheck[i].details[j].lendType</td>
				            		<td>multiLendCheck[i].details[j].lendCnt</td>
				            	</tr>
				            	`
				            }
					}
				}else{
					multiLendCheckHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#multiLendCheckHTML').html(multiLendCheckHTML);
				//2.5风险通话监测
				var riskCallCheckHTML = '';
				if(riskCallCheck.length>0){
					riskCallCheckHTML += `
					<tr>
						<td>检查项</td>
						<td>检查项描述</td>
						<td>命中描述</td>
						<td>命中次数</td>
						<td>时长(s)</td>
						<td>通话标记</td>
						<td>通话类型</td>
						<td>通话次数</td>
						<td>通话时长(s)</td>
			        </tr>
					`
					for(var i=0;i<riskCallCheck.length;i++){
						riskCallCheckHTML += `
				        <tr>
				        	<td rowspan='${riskCallCheck[i].details.length}'>${riskCallCheck[i].item}</td>
				            <td rowspan='${riskCallCheck[i].details.length}'>${riskCallCheck[i].desc}</td>
				            <td rowspan='${riskCallCheck[i].details.length}'>${riskCallCheck[i].hitDesc}</td>
				            <td rowspan='${riskCallCheck[i].details.length}'>${riskCallCheck[i].cnt}</td>
				            <td rowspan='${riskCallCheck[i].details.length}'>${riskCallCheck[i].duration}</td>
				        </tr>
				            `
				            for(var j=0;j<riskCallCheck[i].details.length;j++){
				            	riskCallCheckHTML+=`
				            	<tr>
				            		<td>riskCallCheck[i].details[j].callTag</td>
				            		<td>riskCallCheck[i].details[j].callType</td>
				            		<td>riskCallCheck[i].details[j].callCnt</td>
				            		<td>riskCallCheck[i].details[j].callTime</td>
				            	</tr>
				            	`
				            }
					}
				}else{
					riskCallCheckHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#riskCallCheckHTML').html(riskCallCheckHTML);
				//通话概况
				var callAnalysisHTML = '';
				if(callAnalysis != null){
					var callAnalysisMap = {
						avgCallCnt:'日均通话次数',
						avgCallTime:'日均通话时长(s)',
						avgCallingCnt:'日均主叫次数',
						avgCallingTime:'日均主叫时长(s)',
						avgCalledCnt:'日均被叫次数',
						avgCalledTime:'日均被叫时长(s)',
						locCallPct:'本地通话占比'
					}
					for(var key in callAnalysis){
						callAnalysisHTML += `
							<tr>
								<td>${callAnalysisMap[key]}</td>
					            <td>${callAnalysis[key]}</td>
					        </tr>
						`; 
					}
				}else{
					callAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#callAnalysisHTML').html(callAnalysisHTML);
				
				//活跃情况
				var activeCallAnalysisHTML = '';
				if(activeCallAnalysis.length>0){
					activeCallAnalysisHTML+=`
					<tr>
						<td>描述</td>
						<td>近 1 月</td>
						<td>近 3 月</td>
						<td>近 6 月</td>
						<td>月均</td>
			        </tr>
					` 
					for(var i=0 ;i<activeCallAnalysis.length;i++){
						activeCallAnalysisHTML += `
							<tr>
						        <td>${activeCallAnalysis[i].desc}</td>
						        <td>${activeCallAnalysis[i].lately1m}</td>
						        <td>${activeCallAnalysis[i].lately3m}</td>
						        <td>${activeCallAnalysis[i].lately6m}</td>
						        <td>${activeCallAnalysis[i].avgMonth}</td>
						    </tr>
						`;  
					}
				}else{
					activeCallAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#activeCallAnalysisHTML').html(activeCallAnalysisHTML);
				
				//静默情况
				var silenceAnalysisHTML = '';
				if(silenceAnalysis.length>0){
					silenceAnalysisHTML+=`
					<tr>
						<td>静默次数</td>
						<td>静默总时长(s)</td>
						<td>最长一次静默开始时间(yyyy-MM-dd HH:mm:ss)</td>
						<td>最长一次静默时长(s)</td>
						<td>最近一次静默开始时间(yyyy-MM-dd HH:mm:ss)</td>
						<td>最近一次静默时长(s)</td>
			        </tr>
					` 
					for(var i=0 ;i<silenceAnalysis.length;i++){
						silenceAnalysisHTML += `
							<tr>
						        <td>${silenceAnalysis[i].silenceCnt}</td>
						        <td>${silenceAnalysis[i].silenceTime}</td>
						        <td>${silenceAnalysis[i].longestSilenceStart}</td>
						        <td>${silenceAnalysis[i].longestSilenceTime}</td>
						        <td>${silenceAnalysis[i].lastSilenceStart}</td>
						        <td>${silenceAnalysis[i].lastSilenceTime}</td>
						    </tr>
						`;  
					}
				}else{
					silenceAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#silenceAnalysisHTML').html(silenceAnalysisHTML);
				
				//通话时间段分析
				var callDurationAnalysisHTML = '';
				if(callDurationAnalysis.length>0){
					callDurationAnalysisHTML+=`
					<tr>
						<td>描述</td>
						<td>通话次数</td>
						<td>通话号码数</td>
						<td>最常联系号码</td>
						<td>最常联系号码次数</td>
						<td>平均通话时长(s)</td>
						<td>主叫次数</td>
						<td>主叫时长(s)</td>
						<td>被叫次数</td>
						<td>被叫时长(s)</td>
			        </tr>
					` 
					for(var i=0 ;i<callDurationAnalysis.length;i++){
						callDurationAnalysisHTML += `
							<tr>
						        <td>${callDurationAnalysis[i].desc}</td>
						        <td>${callDurationAnalysis[i].callCnt}</td>
						        <td>${callDurationAnalysis[i].callNumCnt}</td>
						        <td>${callDurationAnalysis[i].freqContactNum}</td>
						        <td>${callDurationAnalysis[i].freqContactNumCnt}</td>
						        <td>${callDurationAnalysis[i].avgCallTime}</td>
						        <td>${callDurationAnalysis[i].callingCnt}</td>
						        <td>${callDurationAnalysis[i].callingTime}</td>
						        <td>${callDurationAnalysis[i].calledCnt}</td>
						        <td>${callDurationAnalysis[i].calledTime}</td>
						    </tr>
						`;  
					}
				}else{
					callDurationAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#callDurationAnalysisHTML').html(callDurationAnalysisHTML);
				
				//消费能力
				var consumptionAnalysisHTML = '';
				if(consumptionAnalysis.length>0){
					consumptionAnalysisHTML+=`
					<tr>
						<td>描述</td>
						<td>近 1 月</td>
						<td>近 3 月</td>
						<td>近 6 月</td>
						<td>月均</td>
			        </tr>
					` 
					for(var i=0 ;i<consumptionAnalysis.length;i++){
						consumptionAnalysisHTML += `
							<tr>
						        <td>${consumptionAnalysis[i].desc}</td>
						        <td>${consumptionAnalysis[i].lately1m}</td>
						        <td>${consumptionAnalysis[i].lately3m}</td>
						        <td>${consumptionAnalysis[i].lately6m}</td>
						        <td>${consumptionAnalysis[i].avgMonth}</td>
						    </tr>
						`;  
					}
				}else{
					consumptionAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#consumptionAnalysisHTML').html(consumptionAnalysisHTML);
				
				//出行信息
				var tripAnalysisHTML = '';
				if(tripAnalysis.length>0){
					tripAnalysisHTML+=`
					<tr>
						<td>出发时间（yyyy-MM-dd）</td>
						<td>回程时间（yyyy-MM-dd）</td>
						<td>出发地</td>
						<td>目的地</td>
			        </tr>
					` 
					for(var i=0 ;i<tripAnalysis.length;i++){
						tripAnalysisHTML += `
							<tr>
						        <td>${tripAnalysis[i].departureDate}</td>
						        <td>${tripAnalysis[i].returnDate}</td>
						        <td>${tripAnalysis[i].departurePlace}</td>
						        <td>${tripAnalysis[i].destinationPlace}</td>
						    </tr>
						`;  
					}
				}else{
					tripAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#tripAnalysisHTML').html(tripAnalysisHTML);
				
				//社交关系概况
				var socialContactAnalysisHTML = '';
				if(socialContactAnalysis.length>0){
					socialContactAnalysisHTML+=`
					<tr>
						<td>项目描述</td>
						<td>内容</td>
						<td>内容描述</td>
			        </tr>
					` 
					for(var i=0 ;i<socialContactAnalysis.length;i++){
						socialContactAnalysisHTML += `
							<tr>
						        <td>${socialContactAnalysis[i].desc}</td>
						        <td>${socialContactAnalysis[i].content}</td>
						        <td>${socialContactAnalysis[i].contentDesc}</td>
						    </tr>
						`;  
					}
				}else{
					socialContactAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#socialContactAnalysisHTML').html(socialContactAnalysisHTML);
				
				//通话区域分析
				var callAreaAnalysisHTML = '';
				if(callAreaAnalysis.length>0){
					callAreaAnalysisHTML+=`
					<tr>
						<td>通话地</td>
						<td>通话次数</td>
						<td>通话号码数</td>
						<td>通话时长</td>
						<td>主叫次数</td>
						<td>主叫时长(s)</td>
						<td>被叫次数</td>
						<td>被叫时长(s)</td>
			        </tr>
					` 
					for(var i=0 ;i<callAreaAnalysis.length;i++){
						callAreaAnalysisHTML += `
							<tr>
						        <td>${callAreaAnalysis[i].attribution}</td>
						        <td>${callAreaAnalysis[i].callCnt}</td>
						        <td>${callAreaAnalysis[i].callNumCnt}</td>
						        <td>${callAreaAnalysis[i].callTime}</td>
						        <td>${callAreaAnalysis[i].callingCnt}</td>
						        <td>${callAreaAnalysis[i].callingTime}</td>
						        <td>${callAreaAnalysis[i].calledCnt}</td>
						        <td>${callAreaAnalysis[i].calledTime}</td>
						    </tr>
						`;  
					}
				}else{
					callAreaAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#callAreaAnalysisHTML').html(callAreaAnalysisHTML);
				
				//通话联系人分析
				var contactAnalysisHTML = '';
				if(contactAnalysis.length>0){
					contactAnalysisHTML+=`
					<tr>
						<td>号码</td>
						<td>是否命中风险名单（1：命中 0：未命中）</td>
						<td>电话标记</td>
						<td>归属地</td>
						<td>通话次数</td>
						<td>通话时长</td>
						<td>主叫次数</td>
						<td>主叫时长(s)</td>
						<td>被叫次数</td>
						<td>被叫时长(s)</td>
						<td>最近一次通话时间(yyyy-MM-dd HH:mm:ss)</td>
						<td>最近一次通话时时长(s)</td>
			        </tr>
					` 
					for(var i=0 ;i<contactAnalysis.length;i++){
						contactAnalysisHTML += `
							<tr>
						        <td>${contactAnalysis[i].callNum}</td>
						        <td>${contactAnalysis[i].isHitRiskList}</td>
						        <td>${contactAnalysis[i].callTag}</td>
						        <td>${contactAnalysis[i].attribution}</td>
						        <td>${contactAnalysis[i].callCnt}</td>
						        <td>${contactAnalysis[i].callTime}</td>
						        <td>${contactAnalysis[i].callingCnt}</td>
						        <td>${contactAnalysis[i].callingTime}</td>
						        <td>${contactAnalysis[i].calledCnt}</td>
						        <td>${contactAnalysis[i].calledTime}</td>
						        <td>${contactAnalysis[i].lastStart}</td>
						        <td>${contactAnalysis[i].lastTime}</td>
						    </tr>
						`;  
					}
				}else{
					contactAnalysisHTML = `<tr><td>暂无资料！</td></tr>`
				}
				$('#contactAnalysisHTML').html(contactAnalysisHTML);
				
			}
		})
		
		$('#show_btn').click(function(){
			$('#accordion').slideToggle('linear')
		})
		
		
=======
>>>>>>> .r331
		var ulnav = $("#nav-pills"),
			dataDom = $("#datalist"),
			//滚动条
			boxDom = $('#databox'),
			barbox = $('#databar'),
			datashowbox = $("#datashowbox"),//数据统计
			databox = $("#databox"),//数据展示层
			$select = $("#selectphoto");
		
		boxDom.perfectScrollbar({
			suppressScrollX:true
		});
		
		//上传错误提示
		var timer = null;
		function fileTip(tipDom,txt){
			var fileBox = tipDom.parent()
			if(fileBox.height() <= 0){
				fileBox.css("height",52)
			}
			clearTimeout(timer);
			tipDom.show().text(txt);
			timer = setTimeout(function(){
				clearTimeout(timer);
				tipDom.fadeOut();
				fileBox.removeAttr("style")
			},2500)
		}
		
		//选择图片
		dataDom.find("input[type='file']").change(function(){
			var that = $(this),
        		files = that[0].files,
        		liDom = that.parents("li"),
        		filebox = liDom.children(".filebox"),
        		tipbox = filebox.children(".tipbox");
        	if(files){
        		files = [].slice.call(files);
        		//验证图片大小和格式
        		for(var i = 0;i < files.length;i++){
        			if(files[i].size > 3145728){
        				if(files.length == 1){
        					that.val("");
        				}
        				fileTip(tipbox,"第"+ (i + 1) +"张图片大小超出限制，请上传3M以内的图片！")
        				files.splice(i,1);
        				i--;
        			}else if(!_x.isImage(files[i].name.substring(files[i].name.lastIndexOf(".")))){
        				if(files.length == 1){
        					that.val("");
        				}
        				fileTip(tipbox,"第"+ (i + 1) +"张图片格式不正确，请上传.jpg/.jpeg/.png/.gif格式的图片！")
        				files.splice(i,1);
        				i--;
        			}
        		}
        		
        		if(files.length == 0)return;
        		
        		//缓存files数组
        		liDom.data("files",files);
        		var allFilesNum = files.length + liDom.find(".yes").length;
        		
				//that.siblings("span").text("共"+ allFilesNum +"张图片");
        		if(files.length == 0)that.siblings("span").text("");
        		
				
				if(window.FileReader){
					filebox.children(".no").remove();
					readImg(files,filebox);//图片预览
					liDom.children("button").show();
				}else{
					fileTip(tipbox,"您当前浏览器不支持图片预览功能！")
				}
				
        	}
		})
		
		//读取图片
		function readImg(files,appendDom){
			var html = "",
				i = 0,
				j = 0;
			var reapImg = function(){
				var file = files[i];
				if(file){
					var reader = new FileReader(),
						image = new Image();
					reader.onload = function(e){
						image.src = e.target.result;
						i++;
						reapImg();
					}
					reader.readAsDataURL(file);
					image.onload = function(){
						var imgData = _x.imgFormat(this.width,this.height,155,125);
						html = "<div class='preview no' filename='"+ file.name +"'>"+
								"	<div class='imgbox'>"+
								"		<img src='"+ this.src +"' style='width: "+ imgData.imgWidth +"px;height: "+ imgData.imgHeight +"px;top: "+ ((125 - imgData.imgHeight) / 2) +"px;left: "+ ((155 - imgData.imgWidth) / 2) +"px;' />"+
								"	</div>"+
								"	<p><span class='name'>"+ file.name +"</span><span class='glyphicon glyphicon-remove del' data-index='"+ j +"'></span></p>"+
								"	<div class='progress' name='"+ file.name +"'></div>"+
								"</div>";
						appendDom.append(html)
						j++;
						boxDom.perfectScrollbar("update");
					}
				}
			}
			reapImg();
		}
		
		//删除预览图
		dataDom.on("click","span.del",function(e){
			e.stopPropagation()
			del_local($(this),true)
		})
		
		function del_local(btnDom,isLocalDel){
			var liDom = btnDom.parents("li"),
				index = btnDom.data("index"),
				files = liDom.data("files"),
				filenum = 0
			
			if(isLocalDel){
				btnDom.parents(".no").remove();
				files.splice(index,1,null);//删除并替换为空
				liDom.data("files",files);
				_x.show_alert_sh("删除成功！",true)
				/*for(var i = 0;i < files.length;i++){
					if(!_x.isEmpty(files[i])){
						filenum++;
					}
				}*/
			}else{
				btnDom.parents(".yes").remove();
			}
			
			if(liDom.find(".no").length === 0)liDom.children("button").hide();
			
			/*var allFilesNum = filenum + liDom.find(".yes").length;
			if(filenum == 0){
				liDom.children("button").hide();
				allFilesNum = "共"+ allFilesNum +"张图片";
				if(allFilesNum == 0)allFilesNum = "";
				liDom.children("h4").find("span.filenownum").text(allFilesNum);
			}else{
				liDom.children("h4").find("span.filenownum").text("共"+ allFilesNum +"张图片");
			}*/
			//刷新滚条
			boxDom.perfectScrollbar("update");
		}
		
		//点击上传
		var allLi = dataDom.children(".fileuploadul").children("li");
		allLi.children("button").click(function(){
			var liDom = $(this).parent(),
				files = liDom.data("files"),
				paramterName = liDom.data("paramtername");
			for(var i = 0;i < files.length;i++){
				if(!_x.isEmpty(files[i])){
					var xhr = new XMLHttpRequest(),
	                	formData = new FormData(),
	                	progressDom = liDom.find(".no[filename='"+ files[i].name +"']").children(".progress");
	            	formData.append(paramterName,files[i]);
	        		xhr.open("post","/admin/uploadEvalPho",true);
	        		xhr.progressDom = xhr.upload.progressDom = progressDom;
	        		xhr.addEventListener("load",function(){
	                    var result = JSON.parse(this.response);
	                    if(result.code == 1){
		                    console.log("success--->"+result)
		                    this.progressDom.parents(".preview").find("img").data("src",result.src)
		                    this.progressDom.fadeOut(300).siblings("p").children(".glyphicon").removeClass("glyphicon-remove del").addClass("glyphicon-ok").css("color","#5cb85c");
		                    this.progressDom.parents(".preview").removeClass("no").addClass("yes").removeAttr("filename");
	                    }else{
	                    	this.progressDom.parents(".preview").remove()
	                    	_x.show_alert_sh(result.msg,false)
	                    }
	                });
	        		
	        		xhr.upload.addEventListener('progress',function(e){
	                    if(e.lengthComputable){//是否可以计算上传字节数
	                        var percent = e.loaded / e.total;                        
	                        this.progressDom.css("width",(percent * 100) + "%");
	                    };
	                });
	        		
	        		xhr.send(formData);
				}
			}
			liDom.children("button").hide();
			//刷新滚条
			boxDom.perfectScrollbar("update");
		})
		
	
		//选择下拉列表更换图片
		$select.on("change",function(){
			createImg($(this).val());
		});	
		
		//初始化图片放大
		function createImg(src){
			var image = new Image()
			image.src = src
			image.onload = function(){
				var dom = $("<div></div>")
				dom.css({
					width: $("#pageContent").parent().width(),
					height: 450
				})
				dom.iviewer({
	                src: this.src
	            });
				$("#pageContent").html(dom)
			}
			image.onerror = function(){
				$("#pageContent").html("")
				_x.show_alert_sh("找不到图片！",false)
			}
		}
		
		/*datashowbox.find("select").change(function(){
			var orderId = $(this).val();
			$.getJSON("/admin/getJson",{type:7,orderId:orderId},function(data){
				datashowbox.hide();
		    	databox.show();
		    	console.log(data)
		    	getBaseTab(data)
			})
		})*/	
			
		$("#rtable").on("click","tbody tr",function(){
			if($(this).hasClass("sel"))return;
			var orderId = $(this).data("orderid");
			$(this).addClass("sel").siblings("tr").removeClass("sel");
			$("#meansp,#err,#ok").hide();
			axios.get("/admin/getJson",{
				params: {
					type:7,
					orderId:orderId
				}
			}).then(function(res){
				datashowbox.hide().siblings(".scrollbox").show();
		    	databox.show();
		    	console.log(res.data)
		    	$("#btn-s-d-box").show()
		    	getBaseTab(res.data);
			})
		})
		
		function getBaseTab(data){
			var fileuploadul = dataDom.children(".fileuploadul");
			fileuploadul.children("li").children(".filebox").html("<div class='tipbox alert alert-danger' role='alert'></div>");
			if(dataDom.children(".jkrmsg").length > 0)dataDom.children(".jkrmsg").remove();
			//添加照片
			var photosel = $("#selectphoto"),
				options = "",
				photoLen = data.picList.length;
			if(photoLen > 0){
				createImg(data.picList[0].src);
				$("#pageContent").css("height",450);
			}else{
				$("#pageContent").css("height",0);
			}
			for(var i = 0;i < photoLen;i++){
				options += "<option value='"+ data.picList[i].src +"'>"+ data.picList[i].lab +"</option>";
			}
			photosel.html(options);
			
			//添加信息
			boxDom.parent().children(".jkrmsg").remove()
			var msgbox = $("<div style='overflow: hidden;border: 1px solid #ddd;padding: 5px 0;border-radius: 3px;' class='jkrmsg'></div>");
			msgbox.html("<div class='col-md-3'>客户姓名：<span style='color: #999;'>"+ data.name +"</span></div><div class='col-md-3'>客户电话：<span style='color: #999;'>"+ data.phone +"</span></div><div class='col-md-4'>客户身份证号码：<span style='color: #999;'>"+ data.idNo +"</span></div><div class='col-md-3'>公里数：<span style='color: #999;'>"+ data.mileageNum +"</span></div><div class='col-md-3'>审核人：<span style='color: #999;'>"+ data.assessor +"</span></div><div class='col-md-4'>业务经理：<span style='color: #999;'>"+ data.userName +"</span></div><div class='col-md-5'>业务经理电话：<span style='color: #999;'>"+ data.userPhone +"</span></div><div class='col-md-4'>审核时间：<span style='color: #999;'>"+ data.reviewDate +"</span></div>");
			boxDom.parent().prepend(msgbox);
			
			//添加已上传的图片
			if(!_x.isEmptyObj(data.zxcx)){//执行信息
				imgShow("zxcx",data.zxcx);
			}
			
			if(!_x.isEmptyObj(data.wzcx)){//违章信息
				imgShow("wzcx",data.wzcx);
			}
			
			if(!_x.isEmptyObj(data.pgcx)){//评估信息
				imgShow("pgcx",data.pgcx);
			}
			
			if(!_x.isEmptyObj(data.lxr)){//联系人（通话记录）
				imgShow("lxr",data.lxr);
			}
			
			function imgShow(paramtername,dataArr){
				var i = 0,
					phtHtml = "",
					len = dataArr.length;
				var digui = function(){
					var image = new Image();
					image.src = dataArr[i];
					if(i >= len){
						fileuploadul.find("li[data-paramtername='"+ paramtername +"']").find(".filebox").html("<div class='tipbox alert alert-danger' role='alert'></div>" + phtHtml);
						//刷新滚条
						boxDom.perfectScrollbar("update");
					}else{
						image.onload = function(){
							var imgData = _x.imgFormat(this.width,this.height,155,125),
								name = decodeURI(this.src.substring(this.src.lastIndexOf("/") + 1));
							phtHtml += "<div class='preview yes formserver'>"+
									   "	<div class='imgbox'>"+
									   "		<img data-src='"+ this.src +"' src='"+ this.src +"' style='width: "+ imgData.imgWidth +"px;height: "+ imgData.imgHeight +"px;top: "+ ((125 - imgData.imgHeight) / 2) +"px;left: "+ ((155 - imgData.imgWidth) / 2) +"px;' />"+
									   "	</div>"+
									   "	<p><span class='name'>"+ name +"</span></p>"+
									   "</div>";
							i++;
							digui();
						}
					}
				}
				digui();
			}
			
			boxDom.perfectScrollbar("update");
		}
		
		
		$("#tongguo").click(function(){
			var errDom = null
			dataDom.children(".fileuploadul").children("li").each(function(){
				var minUp = $(this).data("minup")
				if($(this).find("div.yes").length < minUp){
					errDom = $(this)
					return false
				}
			})
			
			if(errDom != null){
				_x.show_alert_sh("请上传"+ errDom.attr("tipname") +"！",false)
				return
			}
			
			
			var $btn = $(this).button('loading')
			axios.get("/admin/firstReview",{
				params: {
					state:5
				}
			}).then(function(res){
				if(res.data.code == 1){
					_x.show_alert_submit(res.data.msg,true)
				}else{
					_x.show_alert_submit(res.data.msg,false)
				}
				$btn.button('reset')
			})
			.catch(function(){
				$btn.button('reset')
			})
		})
		
		//关闭拒绝理由框
		$("#msginfo").find("button.cl").click(function(){
			$("#msginfo").fadeOut();
		})
		
		//打开拒绝理由框
		$("#jujue").click(function(){
			$("#msginfo").fadeIn();
		})
		
		//提交拒绝
		$("#jjsubmit").click(function(){
			if(_x.isEmpty($("#message-text").val())){
				$("#message-text").attr("placeholder","请输入拒绝理由！");
			}else{
				var $btn = $(this).button('loading')
				var msg = $("#message-text").val();
				axios.get("/admin/firstReview",{
					params: {
						state:3,
						msg:msg
					}
				}).then(function(res){
					if(res.data.code == 1){
						_x.show_alert_submit(res.data.msg,true)
					}else{
						_x.show_alert_submit(res.data.msg,false)
					}
					$btn.button('reset')
				})
				.catch(function(){
					$btn.button('reset')
				})
			}
		})
		
		//图片预览
		var loadingHtml = "<div class='css3loadingbox' style='position: absolute;top: 50%;left: 50%;margin: -40px 0 0 -40px;'>"+
						  "    <div class='line-spin-fade-loader'>"+
						  "        <div></div>"+
						  "        <div></div>"+
						  "        <div></div>"+
						  "	       <div></div>"+
					 	  "	       <div></div>"+
						  "	       <div></div>"+
						  "	       <div></div>"+
						  "	       <div></div>"+
						  "    </div>"+
						  "</div>",
		    showimg = $("#showimg"),//背景层
			imgbox = showimg.children(".imgbox"),//可视区域
			imgboxW = imgbox.width(),
			imgboxH = imgbox.height(),
			imgul = imgbox.children("ul.imgul"),//图片容器
			confirm = $("#alert_confirm"),
			delbBtnDom = null;//缓存删除按钮
		showimg.removeAttr("style").hide().find("ul.btn").hide()
		
		function getImg(opt){
			var src = opt.src,
				title = opt.title,
				isLocalDel = opt.isLocalDel,
				delCls = "",
				liDom = $("<li class='active'></li>"),
				delIndex = opt.delIndex,
				image = new Image();
			image.src = src
			liDom.html(loadingHtml)
			if(isLocalDel){
				delCls = "del-local-hook"//本地删除
			}
			
			image.onload = function(){
				liDom.html("")
				var dom = $("<div></div>"),
					divDom = $("<div class='info'><p>"+ title +"</p><button class='btn btn-danger del-hook "+ delCls +"' data-src='"+ src +"' data-delindex='"+ delIndex +"'>删除</button></div>")
					dom.css({
						width: imgboxW,
						height: imgboxH,
						position: "relative"
					})
					dom.iviewer({
	                     src: src
	                });
					liDom.append(divDom).append(dom)
			}
			imgul.html(liDom);
		}
		
		//点击展示
		dataDom.on("click",".preview",function(){
			var that = $(this),
				src = that.find("img").data("src")
			src = src.substring(src.indexOf("fileSrc") - 1 )
			showimg.fadeIn(300);
			$('html').css("overflow","hidden")
			var option = {
				src: src,
				title: that.find("span.name").text(),
				isLocalDel: false
			}
			
			if(that.hasClass("no")){
				option.isLocalDel = true
				delbBtnDom = that.find("span.del")
			}else{
				delbBtnDom = that.find("p")
			}
			
			getImg(option)
		})
		
		//关闭图片展示
		showimg.on("click",function(e){
			$(this).fadeOut(300);
			$('html').removeAttr("style")
		})
		
		imgbox.on("click","img",function(e){
			e.stopPropagation();
		})
		
		imgbox.on("click",function(e){
			e.stopPropagation();
		})
		
		showimg.on("click","div.iviewer_common",function(e){
			e.stopPropagation()
		})
		
		//点击删除按钮
		imgul.on("click",".del-hook",function(e){
			e.stopPropagation();
			var that = $(this),
				option = {
					isShowBg: false,
					text: "您真的要删除吗？",
					fn: function(modalDom,btn,callback){
						if(that.hasClass("del-local-hook")){
							del_local(delbBtnDom,true)
							showimg.fadeOut(300);
							$('html').removeAttr("style")
							_x.show_alert_sh("删除成功！",true)
							callback()
						}else{
							axios.get("/admin/deleteEvalPho",{
								params: {
									src: decodeURI(that.data("src"))
								}
							})
							.then(function(res){
								if(res.data.code == 1){
									_x.show_alert_sh(res.data.msg,true)
									del_local(delbBtnDom,false)
									showimg.fadeOut(300);
									$('html').removeAttr("style")
									callback()
								}else{
									_x.show_alert_sh(res.data.msg,false)
									btn.button('reset')
								}
							})
							.catch(function(){
								_x.show_alert_sh("删除失败！",false)
								btn.button('reset')
							})
						}
					}
				}
			_x.show_alert_confirm(option)
		})
		
		$("#delete").click(function(){
			var option = {
					isShowBg: false,
					text: "您确定要删除吗？",
					fn: function(modalDom,btn,callback){
						axios.get("/admin/deleteBargain")
						.then(function(res){
							if (res.data.code == 1) {
								_x.show_alert_sh("删除成功！",true)
								setTimeout(function(){
									window.location.reload()
								}, 1000)
							} else {
								_x.show_alert_sh("删除失败！",false)
							}
							btn.button('reset')
						})
					}
				}
			_x.show_alert_confirm(option)
		})
	})
</script>
#end
